<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

    <input type="button" value="提交" id="submit"> 
       
    </input>

    <!-- <form action="hello" method="post">
        <input type="submit" value="提交">
    </form> -->

   <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>

   <script>

    $("#submit").click(function(){
            $.ajax({
                type:"post",
                url:"hello",
                success:function(body){
                    console.log(body);
            },
                error:function(){
                 console.log("error");
            }
      });
        }
    );
      
   </script>
</body>
</html>